<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:vti="http://java.sun.com/jsf/composite/components/vti">
    <h:form id="formPesquisaLeilaoUsuario" prependId="false">
		<vti:dataTable id="tableLeilaoPesq" styleClass="tableList"
			selection="#{selection}" update="#{onselectUpdate}"
			onselectComplete="#{onselectComplete}"
			value="#{leilaoBean.listaEntidade}">
			<p:column styleClass="columnDelete"
				headerText="#{msgs['campo.lance']}">
				<p:commandLink
					rendered="#{lanceBean.consultarStatusLeilao(item) != 'Encerrado'}"
					onclick="document.location.href='#{request.contextPath}/pages/lance.jsf?id=#{item.id}'">
					<h:graphicImage library="images" name="search.png" width="15"
						alt="#{msgs['campo.lance']}" title="#{msgs['campo.lance']}" />
				</p:commandLink>
			</p:column>
			<p:column headerText="#{msgs['campo.status']}"
				styleClass="columnNormalCenter">
				<h:outputText value="#{lanceBean.consultarStatusLeilao(item)}" />
			</p:column>
			<p:column sortBy="#{item.dataInicio}"
				headerText="#{msgs['campo.horaIni']}"
				styleClass="columnNormalCenter">
				<h:outputText value="#{item.dataInicio}">
					<f:convertDateTime pattern="dd/MM/yyyy HH:mm" />
				</h:outputText>
			</p:column>
			<p:column sortBy="#{item.produtoFk.nome}"
				headerText="#{msgs['campo.produto']}">
				<h:outputText value="#{item.produtoFk.nome}" />
			</p:column>
			<p:column headerText="#{msgs['campo.vlrLanceMin']}"
				styleClass="columnSmallCenter">
				<h:outputText value="#{item.vlrLanceMin}" converter="textConverter">
					<f:attribute name="type" value="moeda" />
				</h:outputText>
			</p:column>
			<p:column headerText="#{msgs['campo.tempoDuracao']}"
				styleClass="columnSmallCenter">
				<h:outputText value="#{item.tempoDuracao}" />
			</p:column>
		</vti:dataTable>
	</h:form>
    
</ui:composition>